﻿'Params
'artist (Required (unless mbid)] : The artist name
'album (Required (unless mbid)] : The album
'mbid (Optional) : The musicbrainz id for the album
'autocorrect[0|1] (Optional) : Transform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
'country (Optional) : A country name, as defined by the ISO 3166-1 country names standard.
'api_key (Required) : A Last.fm API key.

'Auth
' This service does not require authentication. 

Public Structure AlbumGetBuylinksResponse

End Structure

Public Class AlbumGetBuylinks
	Inherits BaseRequest
	Dim artist As String = ""
	Dim album As String = ""
	Dim mbid As String = ""
	Dim autocorrect As String = ""
	Dim country As String = ""


	Public xmlresponse As XDocument = Nothing

	Public Sub New(artist As String, album As String, mbid As String, autocorrect As String, country As String)
		Me.artist = artist
		Me.album = album
		Me.mbid = mbid
		Me.autocorrect = autocorrect
		Me.country = country
	End Sub

	Public Sub sendRequest()
		ClearMembers()

		AddMember("method", "album.GetBuylinks")
		AddMember("artist", artist, String.IsNullOrEmpty(mbid))
		AddMember("album", album, String.IsNullOrEmpty(mbid))
		AddMember("mbid", mbid, False)
		AddMember("autocorrect", autocorrect, False)
		AddMember("country", My.Settings.user_name, False)
		AddMember("api_key", My.Settings.api_key, False)

		xmlresponse = sendPOSTResponse()
	End Sub

	Public Function getResponse() As AlbumGetBuylinksResponse
		Dim response As New AlbumGetBuylinksResponse

		Return response
	End Function

End Class
